package com.bjdd.jdy.ui.withdraw;

import com.bjdd.jdy.base.BaseResult;
import com.bjdd.jdy.entity.BankCardBean;
import com.bjdd.jdy.util.Api;
import com.bjdd.jdy.util.RxSchedulers;

import java.util.List;

import rx.Observable;

/**
 * Created by Administrator on 2017/5/12.
 */

public class WithDrawModel implements WithDrawContract.Model {
    @Override
    public Observable<BaseResult<List<BankCardBean>>> bankCards(String token, String carrierId) {
        return Api.getInstance().service
                .bankCards(token,carrierId)
                .compose(RxSchedulers.io_main());
    }

    @Override
    public Observable<BaseResult<String>> withDraw(String token, String carrierId, String bankCardId, String money) {
        return Api.getInstance().service
                .withDraw(token,carrierId,bankCardId,money)
                .compose(RxSchedulers.io_main());
    }
}
